﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    mc:Ignorable="d"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colours.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--  ASSETS AND RESOURCES FROM VARIOUS MICROSOFT WPF THEMES @ CODFEPLEX http://wpf.codeplex.com/Wiki/View.aspx?title=WPF%20Themes -->
    <!--  SOME MODIFICATIONS BUT COPYRIGHT MICROSFOFT -->

    <Color x:Key="MainColor">#FF939393</Color>
    <Color x:Key="HoverColor">#FFAAAAAA</Color>
    <Color x:Key="DefaultColor">#FF9BB1C5</Color>
    <SolidColorBrush x:Key="LightBrush" Color="#FFAFAFAF" />
    <SolidColorBrush x:Key="ShadeBrush" Color="#FF9F9F9F" />

    <Color x:Key="TopGradientSelectColor">#FFFFFFFF</Color>
    <Color x:Key="BottomGradientSelectColor">#FF999999</Color>

    <Color x:Key="BlackColor">#FF000000</Color>
    <Color x:Key="WhiteColor">#FFFFFFFF</Color>

    <SolidColorBrush x:Key="TextBrush" Color="#FF000000" />
    <SolidColorBrush x:Key="NormalBrush" Color="{StaticResource MainColor}" />
    <SolidColorBrush x:Key="NormalBorderBrush" Color="#FF9B9999" />
    <SolidColorBrush x:Key="HoverBrush" Color="{StaticResource HoverColor}" />
    <SolidColorBrush x:Key="GlyphBrush" Color="Black" />

    <LinearGradientBrush x:Key="PressedBrush" EndPoint="0.5,0.971" StartPoint="0.5,0.042">
        <GradientStop Color="#4C000000" Offset="0" />
        <GradientStop Color="#26FFFFFF" Offset="1" />
        <GradientStop Color="#4C000000" Offset="0.467" />
        <GradientStop Color="#26FFFFFF" Offset="0.479" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="ControlBackgroundBrush" Color="#FFD6D6D6" />

    <LinearGradientBrush x:Key="SelectedBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="{StaticResource TopGradientSelectColor}" Offset="0" />
        <GradientStop Color="{StaticResource BottomGradientSelectColor}" Offset="1" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
    <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#FFD4D4D4" />
    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
    <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFFFFFFF" />

    <!--FROM EXPRESSION LIGHT-->
    
    <!-- EXPRESSION COMMON VALUES -->

    <LinearGradientBrush x:Key="ShineBrush" EndPoint="0.5,0.971" StartPoint="0.5,0.042">
        <GradientStop Color="#59FFFFFF" Offset="0" />
        <GradientStop Color="#00FFFFFF" Offset="1" />
        <GradientStop Color="#26FFFFFF" Offset="0.467" />
        <GradientStop Color="#00FFFFFF" Offset="0.475" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="HoverShineBrush" EndPoint="0.5,0.971" StartPoint="0.5,0.042">
        <GradientStop Color="#4CFFFFFF" Offset="0" />
        <GradientStop Color="#26FFFFFF" Offset="1" />
        <GradientStop Color="#26FFFFFF" Offset="0.467" />
        <GradientStop Color="#00FFFFFF" Offset="0.475" />
        <GradientStop Color="#00FFFFFF" Offset="0.856" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PressedBorderBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#444" Offset="0.0" />
        <GradientStop Color="#888" Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="DefaultedBorderBrush" Color="{StaticResource DefaultColor}" />
    <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />

    <Style x:Key="NuclearButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style d:IsControlPart="True" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
        <Setter Property="Background" Value="{DynamicResource NormalBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.8"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" />
                        <ContentPresenter HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Opacity="0.3" Height="Auto" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true" />
                        <Trigger Property="IsMouseOver" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="ContentPresenter" Value="0.1"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearThumbStyle" d:IsControlPart="True" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.8"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOn">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="PressedOff">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Margin="0,0,0,0" x:Name="Grid">
                        <Rectangle HorizontalAlignment="Stretch" x:Name="HoverRectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" 
                                   Stroke="{x:Null}" Margin="4.5,-2,4.5,-2" Opacity="0.3" MinHeight="10">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#CCC" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle HorizontalAlignment="Stretch" x:Name="PressedRectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" 
                                   Stroke="{x:Null}" Margin="4.5,-2,4.5,-2" Opacity="0.3" MinHeight="10">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#CCC" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True" />
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOff}" x:Name="HoverOff_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False" >
                            <Setter Property="Opacity" TargetName="Grid" Value="0.1"/>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOff}" x:Name="PressedOff_BeginStoryboard"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource PressedOn}" x:Name="PressedOn_BeginStoryboard"/>
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearScrollRepeatButtonStyle" d:IsControlPart="True" TargetType="{x:Type RepeatButton}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Grid>
                        <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Border BorderBrush="#DDD" BorderThickness="0,0,1,0" Padding="0,0,4,0">
                        <Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Background="{StaticResource ScrollBarBaseColour}">
                            <Grid.RowDefinitions>
                                <RowDefinition MaxHeight="18" />
                                <RowDefinition Height="0.00001*" />
                                <RowDefinition MaxHeight="18" />
                            </Grid.RowDefinitions>
                            <RepeatButton x:Name="DecreaseRepeat" Command="ScrollBar.LineUpCommand" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}">
                                <Grid Margin="0,0,0,0">
                                    <Path Margin="4.742,3.997,4.946,5.327" VerticalAlignment="Stretch" Height="Auto" Fill="#AAA" Stretch="Fill" 
                                          Stroke="#AAA" StrokeThickness="1" Data="M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z" x:Name="DecreaseArrow" />
                                </Grid>
                            </RepeatButton>
                            <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
                                <Track.Thumb>
                                    <Thumb Style="{DynamicResource NuclearThumbStyle}" Background="{x:Null}" Foreground="{x:Null}" />
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton x:Name="PageUp" Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="ScrollBar.PageDownCommand" />
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton x:Name="PageDown" Style="{DynamicResource NuclearScrollRepeatButtonStyle}" Command="ScrollBar.PageUpCommand" />
                                </Track.DecreaseRepeatButton>
                            </Track>
                            <RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Command="ScrollBar.LineDownCommand">
                                <Grid>
                                    <Path Margin="4.742,3.997,4.946,5.327" x:Name="IncreaseArrow" VerticalAlignment="Stretch" Height="Auto" Fill="#AAA" Stretch="Fill" 
                                          Stroke="#AAA" StrokeThickness="1" Data="M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1" />
                                                <SkewTransform AngleX="0" AngleY="0" />
                                                <RotateTransform Angle="180" />
                                                <TranslateTransform X="0" Y="0" />
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                            </RepeatButton>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation" Value="Horizontal">
                            <Setter Property="LayoutTransform" TargetName="GridRoot">
                                <Setter.Value>
                                    <RotateTransform Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical" />
                            <Setter Property="Command" Value="ScrollBar.LineLeftCommand" TargetName="DecreaseRepeat" />
                            <Setter Property="Command" Value="ScrollBar.LineRightCommand" TargetName="IncreaseRepeat" />
                            <Setter Property="Command" Value="ScrollBar.PageLeftCommand" TargetName="PageDown" />
                            <Setter Property="Command" Value="ScrollBar.PageRightCommand" TargetName="PageUp" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NuclearScrollViewer" TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" />
                        <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" AutomationProperties.AutomationId="HorizontalScrollBar" />
                        <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" x:Name="PART_VerticalScrollBar" Orientation="Vertical" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" AutomationProperties.AutomationId="VerticalScrollBar" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--    Extra colours, burshes, etc used by Whistler Blue theme some of which we are reusing-->

    <SolidColorBrush x:Key="OutsideFontColor" Color="#FF111111"/>
    <SolidColorBrush x:Key="ButtonFontColor" Color="#FF042271"/>
    <Color x:Key="Focus">#FF04CCFF
    </Color>
    <Color x:Key="HyperlinkFocus">#FF2B54BA
    </Color>
    <Color x:Key="Calendar">#FF0066CC
    </Color>
    <Color x:Key="PressStroke1">#FF1D415C
    </Color>
    <Color x:Key="PressStroke2">#FF2C628B
    </Color>
    <Color x:Key="TabStroke">#FF4F8BB9
    </Color>
    <Color x:Key="DataSortArrow">#3F2C628B
    </Color>
    <!--PressStroke2, 25%-->
    <Color x:Key="DropLocate">#FF6392C8
    </Color>
    <Color x:Key="TreeviewArrowNorm">#FF76D5FD
    </Color>
    <Color x:Key="TreeviewArrowOver">#FFC1EFF8
    </Color>
    <Color x:Key="TreeviewArrowCheck">#FF6380EE
    </Color>
    <Color x:Key="ExpandArrowStroke">#FF688DC4
    </Color>
    <Color x:Key="Arrow">#FF425080
    </Color>
    <Color x:Key="Arrow2">#FF7682E4
    </Color>
    <Color x:Key="TextBkgSelection">#FF309AFF
    </Color>
    <Color x:Key="TextboxOver1">#FF5296BD
    </Color>
    <Color x:Key="TextboxOver2">#FFC2E4F6
    </Color>
    <Color x:Key="TextboxPress1">#FF3B79AC
    </Color>
    <Color x:Key="TextboxPress2">#FFB2DBED
    </Color>
    <Color x:Key="ItemOver1">#FFF4FAFD
    </Color>
    <Color x:Key="ItemOver2">#FFCFEDFD
    </Color>
    <Color x:Key="ItemOverStroke">#FFD8F0FA
    </Color>
    <Color x:Key="ItemSelectStroke">#FF98DDFB
    </Color>
    <Color x:Key="Over1">#FFE2F5FF
    </Color>
    <Color x:Key="Over2">#FFC0E7FC
    </Color>
    <Color x:Key="Over3">#FF9EDDFF
    </Color>
    <Color x:Key="Press1">#FF759FB6
    </Color>
    <Color x:Key="Press2">#FFB6E0F6
    </Color>
    <Color x:Key="Press3">#FF9DD5F4
    </Color>
    <Color x:Key="PressHighlight">#FF387599
    </Color>
    <Color x:Key="ButtonHighlightMid">#0095D9FF
    </Color>
    <Color x:Key="ButtonHighlightMid2">#9935A6E6
    </Color>
    <!--60%-->
    <Color x:Key="ButtonHighlightMid3">#A535A6E6
    </Color>
    <!--65%-->
    <Color x:Key="RadioIcon1">#FF90D5E5
    </Color>
    <Color x:Key="RadioIcon2">#FF28A2D1
    </Color>
    <Color x:Key="RadioIcon3">#FF1898D1
    </Color>
    <Color x:Key="RadioIcon4">#FF0F83C7
    </Color>
    <Color x:Key="RadioIconOver1">#FF1EBEFF
    </Color>
    <Color x:Key="RadioIconOver2">#FF13A2F3
    </Color>
    <Color x:Key="RadioIconPress1">#99759FB6
    </Color>
    <!--Press1, 60%-->
    <Color x:Key="RadioIconPress2">#FF4B8DAF
    </Color>
    <Color x:Key="RadioStroke">#FF275674
    </Color>
    <Color x:Key="CheckInnerOver">#FF79C6F9
    </Color>
    <Color x:Key="CheckInnerOver2">#FFAFDEFD
    </Color>
    <Color x:Key="CheckInnerPress">#FF5EB6F7
    </Color>
    <Color x:Key="CheckInnerPress2">#FF90CFFC
    </Color>
    <Color x:Key="CheckOutterOver">#FF5989A5
    </Color>
    <Color x:Key="CheckOutterOver2">#FFDEF9FA
    </Color>
    <Color x:Key="ThumbPress1">#FF6CBBE5
    </Color>
    <Color x:Key="ThumbPress2">#FF50A1CC
    </Color>
    <Color x:Key="ExpanderOver1">#FFB1E7FE
    </Color>
    <Color x:Key="ExpanderOver2">#FFEAFFFF
    </Color>
    <Color x:Key="ExpanderOver3">#A56EB4F6
    </Color>
    <Color x:Key="ExpanderMid">#009DD5F4
    </Color>
    <!--Press3, 0%-->
    <Color x:Key="ExpanderPress1">#FF80CEFF
    </Color>
    <Color x:Key="ExpanderPress2">#FF2D84CF
    </Color>
    <Color x:Key="ThumbDivetOver">#E5387599
    </Color>
    <!--PressHighlight, 20%-->
    <Color x:Key="ThumbDivetFill1">#199DD5F4
    </Color>
    <!--Press3, 10%-->
    <Color x:Key="ThumbDivetFill2">#33387599
    </Color>
    <!--PressHighlight, 20%-->
    <!-- End Color Palette-->
    <!-- Communal Static Resources -->
    <SolidColorBrush x:Key="btnFocus" Color="{StaticResource Focus}"/>
    <SolidColorBrush x:Key="btnPressStroke1" Color="{StaticResource PressStroke1}"/>
    <SolidColorBrush x:Key="btnPressStroke2" Color="{StaticResource PressStroke2}"/>
    <LinearGradientBrush x:Key="btnPressBorder" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="{StaticResource PressStroke1}"/>
        <GradientStop Offset="1" Color="{StaticResource PressStroke2}"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="hyperlinkPress" Color="{StaticResource HyperlinkFocus}"/>
    <SolidColorBrush x:Key="calendarBtnFill" Color="{StaticResource Over2}"/>
    <SolidColorBrush x:Key="calendarTodayStroke" Color="{StaticResource Calendar}"/>
    <SolidColorBrush x:Key="treeviewArrowUnchecked" Color="{StaticResource TreeviewArrowNorm}"/>
    <SolidColorBrush x:Key="treeviewArrowHover" Color="{StaticResource TreeviewArrowOver}"/>
    <SolidColorBrush x:Key="treeviewArrowChecked" Color="{StaticResource TreeviewArrowCheck}"/>
    <SolidColorBrush x:Key="TextBackgroundSelection" Color="{StaticResource TextBkgSelection}"/>
    <SolidColorBrush x:Key="TextBoxOverBrush" Color="{StaticResource TextboxOver1}"/>
    <SolidColorBrush x:Key="TextBoxPressBrush" Color="{StaticResource TextboxPress1}"/>
    <LinearGradientBrush x:Key="TextBoxOver" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="{StaticResource TextboxOver1}"/>
        <GradientStop Offset="0.355" Color="{StaticResource TextboxOver2}"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TextBoxFocus" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="{StaticResource TextboxPress1}"/>
        <GradientStop Offset="0.355" Color="{StaticResource TextboxPress2}"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TextBoxNorm" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FFABAEB3"/>
        <GradientStop Offset="0.355" Color="#FFE2E8EE"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="grayGradient" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="#FFFFFFFF"/>
        <GradientStop Offset="0.171" Color="#FFEDEDED"/>
        <GradientStop Offset="0.5" Color="#FFE7E7E7"/>
        <GradientStop Offset="0.51" Color="#FFDCDCDC"/>
        <GradientStop Offset="1" Color="#FFEAEBEC"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="hoverStroke" Color="{StaticResource ItemOverStroke}"/>
    <SolidColorBrush x:Key="selectedStroke" Color="{StaticResource ItemSelectStroke}"/>
    <LinearGradientBrush x:Key="hoverGradient" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0.5" Color="{StaticResource ItemOver1}"/>
        <GradientStop Offset="0.5" Color="{StaticResource Over1}"/>
        <GradientStop Offset="1" Color="{StaticResource ItemOver2}"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="hoverGradientVertical" StartPoint="0,0.5" EndPoint="1,0.5">
        <GradientStop Offset="0.5" Color="{StaticResource ItemOver1}"/>
        <GradientStop Offset="0.5" Color="{StaticResource Over1}"/>
        <GradientStop Offset="1" Color="{StaticResource ItemOver2}"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="BtnOverFill" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0.5" Color="{StaticResource Over1}"/>
        <GradientStop Offset="0.509" Color="{StaticResource Over2}"/>
        <GradientStop Offset="1" Color="{StaticResource Over3}"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="BtnPressFill" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0" Color="{StaticResource Press1}"/>
        <GradientStop Offset="0.152" Color="{StaticResource Press2}"/>
        <GradientStop Offset="0.5" Color="{StaticResource Over2}"/>
        <GradientStop Offset="0.509" Color="{StaticResource Press3}"/>
    </LinearGradientBrush>
    <!-- standard button specific resources -->
    <LinearGradientBrush x:Key="btnOverFillHighlight" StartPoint="0,0.5" EndPoint="1,0.5">
        <GradientStop Offset="0" Color="{StaticResource ButtonHighlightMid2}"/>
        <GradientStop Offset="0.101" Color="{StaticResource ButtonHighlightMid}"/>
        <GradientStop Offset="0.899" Color="{StaticResource ButtonHighlightMid}"/>
        <GradientStop Offset="1" Color="{StaticResource ButtonHighlightMid2}"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="btnPressFillHighlight" StartPoint="0,0.5" EndPoint="1,0.5">
        <GradientStop Offset="0" Color="{StaticResource PressHighlight}"/>
        <GradientStop Offset="0.037" Color="{StaticResource ButtonHighlightMid3}"/>
        <GradientStop Offset="0.143" Color="{StaticResource ButtonHighlightMid}"/>
        <GradientStop Offset="0.857" Color="{StaticResource ButtonHighlightMid}"/>
        <GradientStop Offset="0.963" Color="{StaticResource ButtonHighlightMid3}"/>
        <GradientStop Offset="1" Color="{StaticResource PressHighlight}"/>
    </LinearGradientBrush>

    <!-- Based on Microsoft's Whistler Blue theme in WPF Toolkit-->

    <Style TargetType="{x:Type ListView}">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
    </Style>

    <Style x:Key="ListViewItemFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle RadiusX="2" RadiusY="2" Stroke="#8E6EA6F5" StrokeThickness="1"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ListViewItem}">
        <Setter Property="FocusVisualStyle" Value="{StaticResource ListViewItemFocusVisual}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="0,0,0,1"/>
        <Setter Property="Padding" Value="5,2,5,2"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource OutsideFontColor}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="HoverOn">
                            <DoubleAnimation Duration="00:00:00.100" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0.73"/>
                        </Storyboard>
                        <Storyboard x:Key="HoverOff">
                            <DoubleAnimation Duration="00:00:00.400" Storyboard.TargetName="BackgroundGradientOver" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOn">
                            <DoubleAnimation Duration="00:00:00.100" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0.84"/>
                            <DoubleAnimation Duration="00:00:00.100" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                        <Storyboard x:Key="SelectedOff">
                            <DoubleAnimation Duration="00:00:00.400" Storyboard.TargetName="BackgroundGradientSelected" Storyboard.TargetProperty="Opacity" To="0"/>
                            <DoubleAnimation Duration="00:00:00.400" Storyboard.TargetName="BackgroundGradientSelectedDisabled" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" SnapsToDevicePixels="true">
                        <Grid Margin="2,0,2,0">
                            <Rectangle x:Name="BackgroundGradientOver" Fill="{StaticResource hoverGradient}" Opacity="0" RadiusX="2" RadiusY="2" Stroke="{StaticResource hoverStroke}"/>
                            <Rectangle x:Name="BackgroundGradientSelectedDisabled" Fill="{StaticResource grayGradient}" Opacity="0" RadiusX="2" RadiusY="2" Stroke="#7F8E8F8F"/>
                            <Rectangle x:Name="BackgroundGradientSelected" Fill="{StaticResource BtnOverFill}" Opacity="0" RadiusX="2" RadiusY="2" Stroke="{StaticResource selectedStroke}"/>
                            <Rectangle x:Name="BackgroundHighlight" Margin="1" RadiusX="1" RadiusY="1" Stroke="#A0FFFFFF"/>
                            <GridViewRowPresenter Margin="0,2,0,2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="HoverOff_BeginStoryboard" Storyboard="{StaticResource HoverOff}"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource HoverOn}"/>
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Trigger.ExitActions>
                                <BeginStoryboard x:Name="SelectedOff_BeginStoryboard" Storyboard="{StaticResource SelectedOff}"/>
                            </Trigger.ExitActions>
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="SelectedOn_BeginStoryboard" Storyboard="{StaticResource SelectedOn}"/>
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                            <Setter TargetName="BackgroundGradientSelected" Property="Visibility" Value="Hidden"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="Selector.IsSelectionActive" Value="false"/>
                            </MultiTrigger.Conditions>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
        <Setter Property="Canvas.Right" Value="-8.5"/>
        <Setter Property="Width" Value="8"/>
        <Setter Property="Height" Value="{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Padding" Value="0,3,0,4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border Background="#00FFFFFF" Padding="{TemplateBinding Padding}">
                        <Rectangle Width="1" HorizontalAlignment="Center" Fill="{StaticResource LightForeground}">
                        </Rectangle>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type GridViewColumnHeader}" TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="2,0,2,8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
                    <Grid Margin="0,1,0,1">
                        <Grid>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="2,2,2,2" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
                            <Border x:Name="DisabledVisualElement" Background="#FFF1F1F1" BorderBrush="#FFB2B2B2" BorderThickness="1" CornerRadius="3" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <Canvas>
                            <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}"/>
                        </Canvas>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Height" Value="Auto">
                            <Setter Property="MinHeight" Value="20"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            <Setter TargetName="DisabledVisualElement" Property="Opacity" Value="0.4"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>